#include<iostream>
using namespace std;

int main(int argc, char const *argv[])
{
    int N; scanf("%d",&N);
    long double res = 0;
    for(int i=0;i<N;++i) 
    {
        long double tmp; scanf("%llf",&tmp);
        res +=  tmp * (i+1) * (N-i);
    }
    printf("%.2llf\n",res);
    return 0;
}
